package com.yuyou.train.lesson.vo.req;

import io.swagger.annotations.ApiModelProperty;

import java.util.List;

import org.apache.commons.lang3.StringUtils;

import com.yuyou.train.util.bean.ResBoolSimpleInfo;


/**
 * @author 
 */
public class ReqLessonRel{

	@ApiModelProperty(value = "课程ID", required = true)
    private String lessonId;
	
	@ApiModelProperty(value = "资源ID", required = true)
    private String resourceId;
	
	@ApiModelProperty(value = "规则ID", required = true)
    private String ruleId;
	
	@ApiModelProperty(value = "帧列表", required = false)
    List<ReqLessonRelFrame> lesResRulFra;

	public String getLessonId() {
		return lessonId;
	}

	public void setLessonId(String lessonId) {
		this.lessonId = lessonId;
	}

	public String getResourceId() {
		return resourceId;
	}

	public void setResourceId(String resourceId) {
		this.resourceId = resourceId;
	}

	public String getRuleId() {
		return ruleId;
	}

	public void setRuleId(String ruleId) {
		this.ruleId = ruleId;
	}

	public List<ReqLessonRelFrame> getLesResRulFra() {
		return lesResRulFra;
	}

	public void setLesResRulFra(List<ReqLessonRelFrame> lesResRulFra) {
		this.lesResRulFra = lesResRulFra;
	}


	
	
	public static ResBoolSimpleInfo<String> validate(ReqLessonRel req){
		ResBoolSimpleInfo<String> res=new ResBoolSimpleInfo<String>();
		if(StringUtils.isEmpty(req.getLessonId())){
			res.setSuccess(false);
			res.setMessage("lessonId不能为空");
			return res;
		}	
		if(StringUtils.isEmpty(req.getResourceId())){
			res.setSuccess(false);
			res.setMessage("resourceId不能为空");
			return res;
		}
		if(StringUtils.isEmpty(req.getRuleId())){
			res.setSuccess(false);
			res.setMessage("rule不能为空");
			return res;
		}		
		return ResBoolSimpleInfo.getSuccessInfo();
	}
	
	
	
	
	
	
	
	
	
	
	
}
